<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=393, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>注册账号</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            width: 100%;
            height: 100vh; /* 全屏高度 */
            display: flex;
            justify-content: center; /* 水平居中 */
            align-items: center; /* 垂直居中 */
            overflow: hidden;
        }

        .container {
            width: 393px;
            height: 853px;
            max-width: 100%;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            padding: 20px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            background-color: #ddd;
            border-radius: 4px;
        }

        .header h2 {
            font-size: 16px;
            margin: 0;
            text-align: left;
            flex-grow: 1;
        }

        .back-button {
            text-decoration: none;
            color: #333;
            font-size: 14px;
            background-color: #ddd;
            padding: 5px 10px;
            border-radius: 4px;
        }

        .back-button:hover {
            background-color: #bbb;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            color: #333;
        }

        .form-group input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        .submit-btn {
            width: 100%;
            padding: 10px;
            background-color: #007BFF;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }

        .submit-btn:hover {
            background-color: #0056b3;
        }

        @media (max-width: 768px) {
            .container {
                margin: 20px auto;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 顶部导航 -->
        <div class="header">
            <h2>注册账号</h2>
            <a href="{{ url_for('login') }}" class="back-button">返回</a>
        </div>
        
        <!-- 注册表单 -->
        <form method="POST" action="{{ url_for('register') }}">
            <div class="form-group">
                <label for="username">账号：</label>
                <input type="text" id="username" name="username" placeholder="请输入账号" required>
            </div>
            <div class="form-group">
                <label for="email">邮箱：</label>
                <input type="email" id="email" name="email" placeholder="请输入邮箱" required>
            </div>
            <div class="form-group">
                <label for="password">密码：</label>
                <input type="password" id="password" name="password" placeholder="请输入密码" required>
            </div>
            <div class="form-group">
                <label for="confirm_password">再次输入：</label>
                <input type="password" id="confirm_password" name="confirm_password" placeholder="请再次输入密码" required>
            </div>
            <button type="submit" class="submit-btn">确认</button>
        </form>
    </div>
</body>
</html>
